<form class="form-horizontal">
    <div class="form-group">
        <label class="col-sm-2 control-label">产品编号</label>
        <div class="col-sm-10">
            <input type="text" class="form-control" id="productCode" />
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-2 control-label">产品类别</label>
        <div class="col-sm-10" id="categoryName">
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-2 control-label">名称</label>
        <div class="col-sm-10">
            <input type="text" class="form-control" id="productName" />
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-2 control-label">数量单位</label>
        <div class="col-sm-10">
            <input type="text" class="form-control" id="unitName" />
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-2 control-label">销售价</label>
        <div class="col-sm-10">
            <input type="text" class="form-control" id="price" />
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-2 control-label">添加日期</label>
        <div class="col-sm-10">
            <input type="text" class="form-control" id="createDate" />
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-2 control-label">产品描述</label>
        <div class="col-sm-10">
            <input type="text" class="form-control" id="remark" />
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-2 control-label">库存数</label>
        <div class="col-sm-10">
            <input type="text" class="form-control" id="num" />
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-2 control-label">采购在途数</label>
        <div class="col-sm-10">
            <input type="text" class="form-control" id="poNum" />
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-2 control-label">销售代发数</label>
        <div class="col-sm-10">
            <input type="text" class="form-control" id="soNum" />
        </div>
    </div>
</form>
<script type="text/html" id="check">
    {{each data}}
    <input type="radio" name="categoryName" value="{{$value.categoryID}}" unchecked>{{$value.name}}</input>
    {{/each}}
</script>
<script>
    $(function () {
        Ajax.get(
            "selectCategoryForProduct",
            {},
            function (result) {
                var div=document.getElementById("categoryName")
                var data=result.data;
                var html=template('check',{
                    data:data
                })
                div.innerHTML=html
            }
        )
    })
</script>